Integrand size = 21, antiderivative size = 84 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3}{8} a \left (a^2+b^2\right ) x-\frac {3 a \cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{8 d}+\frac {\cos ^3(c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{4 d} \]
3/8*a*(a^2+b^2)*x-3/8*a*cos(d*x+c)^2*(b-a*tan(d*x+c))*(a+b*tan(d*x+c))/d+1 /4*cos(d*x+c)^3*sin(d*x+c)*(a+b*tan(d*x+c))^3/d
Leaf count is larger than twice the leaf count of optimal. \(488\) vs. \(2(84)=168\).
Time = 1.22 (sec) , antiderivative size = 488, normalized size of antiderivative = 5.81 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {39 a^6 b^2+41 a^4 b^4+21 a^2 b^6+3 b^8-4 b^2 \left (a^2+b^2\right )^2 \left (3 a^2+b^2\right ) \cos (2 (c+d x))+b^2 \left (-3 a^2+b^2\right ) \left (a^2+b^2\right )^2 \cos (4 (c+d x))-6 a^7 \sqrt {-b^2} \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+18 a^5 \left (-b^2\right )^{3/2} \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+6 a b^4 \left (-b^2\right )^{3/2} \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )-18 a^3 \left (-b^2\right )^{5/2} \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+6 a^7 \sqrt {-b^2} \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+18 a^3 b^4 \sqrt {-b^2} \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+6 a b^6 \sqrt {-b^2} \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )-18 a^5 \left (-b^2\right )^{3/2} \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+8 a^7 b \sin (2 (c+d x))+16 a^5 b^3 \sin (2 (c+d x))+8 a^3 b^5 \sin (2 (c+d x))+a^7 b \sin (4 (c+d x))-a^5 b^3 \sin (4 (c+d x))-5 a^3 b^5 \sin (4 (c+d x))-3 a b^7 \sin (4 (c+d x))}{32 b \left (a^2+b^2\right )^2 d} \]
(39*a^6*b^2 + 41*a^4*b^4 + 21*a^2*b^6 + 3*b^8 - 4*b^2*(a^2 + b^2)^2*(3*a^2 + b^2)*Cos[2*(c + d*x)] + b^2*(-3*a^2 + b^2)*(a^2 + b^2)^2*Cos[4*(c + d*x )] - 6*a^7*Sqrt[-b^2]*Log[Sqrt[-b^2] - b*Tan[c + d*x]] + 18*a^5*(-b^2)^(3/ 2)*Log[Sqrt[-b^2] - b*Tan[c + d*x]] + 6*a*b^4*(-b^2)^(3/2)*Log[Sqrt[-b^2] - b*Tan[c + d*x]] - 18*a^3*(-b^2)^(5/2)*Log[Sqrt[-b^2] - b*Tan[c + d*x]] + 6*a^7*Sqrt[-b^2]*Log[Sqrt[-b^2] + b*Tan[c + d*x]] + 18*a^3*b^4*Sqrt[-b^2] *Log[Sqrt[-b^2] + b*Tan[c + d*x]] + 6*a*b^6*Sqrt[-b^2]*Log[Sqrt[-b^2] + b* Tan[c + d*x]] - 18*a^5*(-b^2)^(3/2)*Log[Sqrt[-b^2] + b*Tan[c + d*x]] + 8*a ^7*b*Sin[2*(c + d*x)] + 16*a^5*b^3*Sin[2*(c + d*x)] + 8*a^3*b^5*Sin[2*(c + d*x)] + a^7*b*Sin[4*(c + d*x)] - a^5*b^3*Sin[4*(c + d*x)] - 5*a^3*b^5*Sin [4*(c + d*x)] - 3*a*b^7*Sin[4*(c + d*x)])/(32*b*(a^2 + b^2)^2*d)
Time = 0.28 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.55, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 3987, 27, 490, 487, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^3}{\sec (c+d x)^4}dx\) |
\(\Big \downarrow \) 3987 |
\(\displaystyle \frac {\int \frac {b^6 (a+b \tan (c+d x))^3}{\left (\tan ^2(c+d x) b^2+b^2\right )^3}d(b \tan (c+d x))}{b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b^5 \int \frac {(a+b \tan (c+d x))^3}{\left (\tan ^2(c+d x) b^2+b^2\right )^3}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 490 |
\(\displaystyle \frac {b^5 \left (\frac {3 a \int \frac {(a+b \tan (c+d x))^2}{\left (\tan ^2(c+d x) b^2+b^2\right )^2}d(b \tan (c+d x))}{4 b^2}+\frac {\tan (c+d x) (a+b \tan (c+d x))^3}{4 b \left (b^2 \tan ^2(c+d x)+b^2\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 487 |
\(\displaystyle \frac {b^5 \left (\frac {3 a \left (\frac {\left (a^2+b^2\right ) \int \frac {1}{\tan ^2(c+d x) b^2+b^2}d(b \tan (c+d x))}{2 b^2}-\frac {(a+b \tan (c+d x)) \left (b^2-a b \tan (c+d x)\right )}{2 b^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{4 b^2}+\frac {\tan (c+d x) (a+b \tan (c+d x))^3}{4 b \left (b^2 \tan ^2(c+d x)+b^2\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {b^5 \left (\frac {3 a \left (\frac {\left (a^2+b^2\right ) \arctan (\tan (c+d x))}{2 b^3}-\frac {(a+b \tan (c+d x)) \left (b^2-a b \tan (c+d x)\right )}{2 b^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{4 b^2}+\frac {\tan (c+d x) (a+b \tan (c+d x))^3}{4 b \left (b^2 \tan ^2(c+d x)+b^2\right )^2}\right )}{d}\) |
(b^5*((Tan[c + d*x]*(a + b*Tan[c + d*x])^3)/(4*b*(b^2 + b^2*Tan[c + d*x]^2 )^2) + (3*a*(((a^2 + b^2)*ArcTan[Tan[c + d*x]])/(2*b^3) - ((a + b*Tan[c + d*x])*(b^2 - a*b*Tan[c + d*x]))/(2*b^2*(b^2 + b^2*Tan[c + d*x]^2))))/(4*b^ 2)))/d
3.6.36.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ (c + d*x)^(n - 1)*(a*d - b*c*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[(2*p + 3)*((b*c^2 + a*d^2)/(2*a*b*(p + 1))) Int[(c + d*x)^(n - 2)*( a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[n + 2*p + 2, 0] && LtQ[p, -1]
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ (-x)*(c + d*x)^n*((a + b*x^2)^(p + 1)/(2*a*(p + 1))), x] - Simp[c*(n/(2*a*( p + 1))) Int[(c + d*x)^(n - 1)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b , c, d, n, p}, x] && EqQ[n + 2*p + 3, 0] && LtQ[p, -1]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(b*f) Subst[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[m/2]
Time = 20.99 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.36
method | result | size |
derivativedivides | \(\frac {\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4}+3 a \,b^{2} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {3 a^{2} b \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(114\) |
default | \(\frac {\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4}+3 a \,b^{2} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {3 a^{2} b \left (\cos ^{4}\left (d x +c \right )\right )}{4}+a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(114\) |
risch | \(\frac {3 a^{3} x}{8}+\frac {3 x a \,b^{2}}{8}-\frac {3 b \cos \left (4 d x +4 c \right ) a^{2}}{32 d}+\frac {b^{3} \cos \left (4 d x +4 c \right )}{32 d}+\frac {a^{3} \sin \left (4 d x +4 c \right )}{32 d}-\frac {3 a \sin \left (4 d x +4 c \right ) b^{2}}{32 d}-\frac {3 b \cos \left (2 d x +2 c \right ) a^{2}}{8 d}-\frac {b^{3} \cos \left (2 d x +2 c \right )}{8 d}+\frac {a^{3} \sin \left (2 d x +2 c \right )}{4 d}\) | \(137\) |
1/d*(1/4*b^3*sin(d*x+c)^4+3*a*b^2*(-1/4*cos(d*x+c)^3*sin(d*x+c)+1/8*sin(d* x+c)*cos(d*x+c)+1/8*d*x+1/8*c)-3/4*a^2*b*cos(d*x+c)^4+a^3*(1/4*(cos(d*x+c) ^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c))
Time = 0.25 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.19 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {4 \, b^{3} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} - 3 \, {\left (a^{3} + a b^{2}\right )} d x - {\left (2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
-1/8*(4*b^3*cos(d*x + c)^2 + 2*(3*a^2*b - b^3)*cos(d*x + c)^4 - 3*(a^3 + a *b^2)*d*x - (2*(a^3 - 3*a*b^2)*cos(d*x + c)^3 + 3*(a^3 + a*b^2)*cos(d*x + c))*sin(d*x + c))/d
\[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \cos ^{4}{\left (c + d x \right )}\, dx \]
Time = 0.48 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.31 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 \, {\left (a^{3} + a b^{2}\right )} {\left (d x + c\right )} - \frac {4 \, b^{3} \tan \left (d x + c\right )^{2} - 3 \, {\left (a^{3} + a b^{2}\right )} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b + 2 \, b^{3} - {\left (5 \, a^{3} - 3 \, a b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]
1/8*(3*(a^3 + a*b^2)*(d*x + c) - (4*b^3*tan(d*x + c)^2 - 3*(a^3 + a*b^2)*t an(d*x + c)^3 + 6*a^2*b + 2*b^3 - (5*a^3 - 3*a*b^2)*tan(d*x + c))/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d
Leaf count of result is larger than twice the leaf count of optimal. 2496 vs. \(2 (79) = 158\).
Time = 12.25 (sec) , antiderivative size = 2496, normalized size of antiderivative = 29.71 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\text {Too large to display} \]
1/64*(9*pi*a*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^4 + 24*a^3 *d*x*tan(d*x)^4*tan(c)^4 + 24*a*b^2*d*x*tan(d*x)^4*tan(c)^4 + 9*pi*a*b^2*s gn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan (d*x)^4*tan(c)^4 + 18*pi*a*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d *x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan (c)^2 + 18*pi*a*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c ) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^4 + 18* a*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^ 4 - 18*a*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^4 *tan(c)^4 + 48*a^3*d*x*tan(d*x)^4*tan(c)^2 + 48*a*b^2*d*x*tan(d*x)^4*tan(c )^2 + 18*pi*a*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d *x) - 2*tan(c))*tan(d*x)^4*tan(c)^2 + 48*a^3*d*x*tan(d*x)^2*tan(c)^4 + 48* a*b^2*d*x*tan(d*x)^2*tan(c)^4 + 18*pi*a*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*t an(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^4 - 30*a^2*b*t an(d*x)^4*tan(c)^4 - 6*b^3*tan(d*x)^4*tan(c)^4 + 9*pi*a*b^2*sgn(2*tan(d*x) ^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d* x) - 2*tan(c))*tan(d*x)^4 + 36*pi*a*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn (-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d *x)^2*tan(c)^2 + 36*a*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) -...
Time = 4.11 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.30 \[ \int \cos ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3\,a^3\,x}{8}-\frac {6\,a^2\,b-{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (3\,a^3+3\,a\,b^2\right )+2\,b^3+\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a\,b^2-5\,a^3\right )+4\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{d\,\left (8\,{\mathrm {tan}\left (c+d\,x\right )}^4+16\,{\mathrm {tan}\left (c+d\,x\right )}^2+8\right )}+\frac {3\,a\,b^2\,x}{8} \]